package com.example.demo.controller;

import com.example.demo.pojo.Menu;
import com.example.demo.service.MenuService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author 翁佃峰
 * date:2020/10/29 12:56
 */
@RestController
@RequestMapping("Menu")
public class MenuController {
    @Resource
    MenuService menuService;
    @GetMapping("getMenuList")
    public List<Menu> getMenuList(){
        return menuService.getMenuList();
    }
    @PostMapping("getLastMenuList")
    public List<Menu> setLostMenuByMenu(@RequestBody List<Menu> menu){
        return menuService.setLostMenuByMenu(menu);
    }
}
